home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
lib
/
other
/
ffs.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-07-19
|
209b
|
17 lines
#include <lib.h>
/* ffs(3)
*
* Author: Terrence W. Holm Sep. 1988
*/
int ffs(word)
int word;
{
int i;
if (word == 0) return(0);
for (i = 1;; ++i, word >>= 1)
if (word & 1) return(i);
}